﻿using DotNetCoreStudy.Page.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DotNetCoreStudy.Page.services
{
    public interface IEmployeeService
    {
        /// <summary>
        /// 添加员工
        /// </summary>
        /// <param name="employee"></param>
        /// <returns></returns>
        Task Add(Employee employee);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="employee"></param>
        /// <returns></returns>
        Task Update(Employee employee);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="employee"></param>
        /// <returns></returns>
        Task<bool> Delete(int id);

        /// <summary>
        /// 获取所有员工信息
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<Employee>> GetAll();
        
        /// <summary>
        /// 获取指定部门下的所有员工信息
        /// </summary>
        /// <param name="departmentId"></param>
        /// <returns></returns>
        Task<IEnumerable<Employee>> GetEmployeeByDepartmentId(int departmentId);        

        /// <summary>
        /// 根据id获取员工
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<Employee> GetEmployeeById(int Id);

        /// <summary>
        /// 解雇指定员工
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Employee> Fire(int id);
    }
}
